package net.stogi.dsper.ui.client.module.tag;

import java.util.List;

import net.stogi.dsper.api.dto.TagDto;

import com.google.gwt.event.shared.GwtEvent;

public class TagsSelectedEvent extends GwtEvent<TagsSelectedHandler> {

	public static final GwtEvent.Type<TagsSelectedHandler> TYPE = new GwtEvent.Type<TagsSelectedHandler>();

	private List<TagDto> selectedTags;

	public TagsSelectedEvent(List<TagDto> selectedTags) {
		this.selectedTags = selectedTags;
	}

	@SuppressWarnings("unused")
	private TagsSelectedEvent() {}

	@Override
	public Type<TagsSelectedHandler> getAssociatedType() {
		return TYPE;
	}

	/**
	 * @return the selectedDataSources
	 */
	public List<TagDto> getSelectedTags() {
		return selectedTags;
	}

	/**
	 * @param selectedDataSources
	 *            the selectedDataSources to set
	 */
	public void setSelectedTags(List<TagDto> selectedTags) {
		this.selectedTags = selectedTags;
	}

	@Override
	protected void dispatch(TagsSelectedHandler handler) {
		handler.onTagsSelected(this);
	}
}
